﻿<%@ Page Language="C#" AutoEventWireup="True" Debug="True" ValidateRequest = "false"  ResponseEncoding="utf-8"  CodeBehind="DemoADO.NET.aspx.cs" Inherits="CRUD_ADO.Net.GUI.DemoADO_NET" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            width: 266px;
        }
    </style>
</head>
<body style="height: 456px">
    <form id="form1" runat="server">
    <div>
    
    </div>
        <table style="width: 100%; height: 464px;">
            <tr>
                <td colspan="2">
                    <h1 style="color: #FF0066">ADO.NET CRUD</h1>
                </td>
            </tr>
            <tr>
                <td class="auto-style1">
                    <asp:Panel ID="Panel1" runat="server" Height="356px">
                        <asp:TextBox ID="txtCountItem" runat="server" BackColor="#990099" BorderStyle="None" Enabled="False" EnableTheming="True" Font-Size="Larger" ForeColor="White" Height="30px" Width="133px"></asp:TextBox>
                        <br />
                        <br />
                        <asp:Label ID="Label1" runat="server" Text="CustomerID:"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:TextBox ID="txtCustomerID" runat="server" Width="249px"></asp:TextBox>
                        <br />
                        <br />
                        <asp:Label ID="Label2" runat="server" Text="CompanyName:"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:TextBox ID="txtCommanyName" runat="server" Width="243px " ValidateRequest="false" TextMode="MultiLine"></asp:TextBox>
                        <br />
                        <br />
                        <asp:Label ID="Label3" runat="server" Text="ContactName" ></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:TextBox ID="txtContacName" runat="server" Width="243px" ValidateRequest="false"></asp:TextBox>
                        <br />
                        <br />
                        <asp:Label ID="Label4" runat="server" Text="Address:"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtAddress" runat="server" Width="240px" ValidateRequest="false"></asp:TextBox>
                        <br />
                        <br />
                        <asp:Label ID="Label5" runat="server" Text="Phone:"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtPhone" runat="server" Width="240px"></asp:TextBox>
                        <br />
                    </asp:Panel>
                </td>
                <td>
                    <div style="overflow: scroll;height:400px; width: 841px;">
                    <asp:GridView ID="GridView1" runat="server" Height="348px" Width="823px" CellPadding="4" AutoGenerateSelectButton="True" CellSpacing="2" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" ShowHeaderWhenEmpty="True">
                        <FooterStyle BackColor="#CCCCCC" />
                        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
                        <RowStyle BackColor="White" BorderColor="White" HorizontalAlign="Center" VerticalAlign="Middle" />
                        <SelectedRowStyle BackColor="#000099" BorderColor="#FFFFCC" Font-Bold="True" ForeColor="White" />
                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                        <SortedAscendingHeaderStyle BackColor="#808080" />
                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                        <SortedDescendingHeaderStyle BackColor="#383838" />
                    </asp:GridView>
                        </div>
                </td>
            </tr>
            <tr>
                <td class="auto-style1">
                    <asp:Label ID="lblStatus" runat="server" ForeColor="Red"></asp:Label>
                </td>
                <td>
                    <asp:Panel ID="Panel2" runat="server" Height="45px">
                        <asp:Button ID="btnAddnew" runat="server" Text="Add new" BackColor="Black" ForeColor="White"  Width="89px" OnClick="btnAddnew_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnUpdate" runat="server" BackColor="Black" ForeColor="White"  Text="Update" Width="98px" OnClick="btnUpdate_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnDelete" runat="server" BackColor="Black" ForeColor="White" Text="Delete" Width="101px" OnClick="btnDelete_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnRefesh" runat="server" BackColor="Black" ForeColor="White" Text="Refresh" Width="89px" OnClick="btnRefesh_Click" />
                    </asp:Panel>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
